<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据类型转换</title>
</head>
<body>
    <script>
       document.write(parseInt('50px'));
       document.write(parseInt('px50'));
       document.write(parseInt('50px50'));
       document.write(parseInt('50.51'));
       document.write(parseInt('050px'));
       document.write(parseFloat('50px'));
       document.write(parseFloat('px50'));
       document.write(parseFloat('50px50'));
       document.write(parseFloat('50.51'));
       document.write(parseFloat('050px'));
       document.write(parseInt('50px'));
    </script>
</body>
</html>